#ifndef __SCNS_SMCTP_H__
#define __SCNS_SMCTP_H__

#include "ScnsConfig.h"

#if defined(SCNS_SMCTP_ENABLE)&&SCNS_SMCTP_ENABLE==1

#include "ScnsBspSmctp.h"

#include "ScnsYing.h"

typedef enum
{
    SCNS_SMCTP_STATUS_OK=SCNS_YING_STATUS_OK,
    SCNS_SMCTP_STATUS_BSP_FAILED=SCNS_YING_STATUS_BSP_FAILED,
    SCNS_SMCTP_STATUS_FAILED=SCNS_YING_STATUS_FAILED,
    SCNS_SMCTP_STATUS_NOT_INIT,
    SCNS_SMCTP_STATUS_FULL,
}ScnsSmctpStatus;

extern ScnsSmctpStatus scnsSmctpInit(void);
extern ScnsSmctpStatus scnsSmctpCanSend(ScnsSmctpChannelEnum ch,uint32 len);
extern void scnsSmctpSendErrorCallback(void);
extern void scnsSmctpSendFinishCallback(void);
extern void scnsSmctpPutChar(ScnsSmctpChannelEnum ch,char c);
extern void scnsSmctpPutChars(ScnsSmctpChannelEnum ch,const uint8*buf,uint32 len,void (*callback)(void));
extern void scnsSmctpReceive(const uint8 buf[],uint32 length);
extern void scnsSmctpFlushBuf(void);
extern uint64 scnsSmctpGetFlushUs(void);
extern void __scnsSmctpPrintBuf(ScnsSmctpChannelEnum ch,const char*file,int line,const uint8*buf,uint32 len,uint8 block);
#define scnsSmctpPrintBuf(ch,buf,len,block)__scnsSmctpPrintBuf(ch,__file__,__LINE__,buf,len,block)

#endif
#endif
